<?php
/**
 * 学生界面 添加和修改的页面-------状态：弃用
 */
use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\DorminfoModel */
/* @var $form yii\widgets\ActiveForm */
$this->title = '住宿信息';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="dorminfo-model-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'stu_id')->textInput(['maxlength' => true,
    		'value'=>$id,
    		'readOnly'=>true,
    ])->label('学号') ?>

    <?= $form->field($model, 'dorm_area')->textInput()->dropDownList(['0'=>'东校园','1'=>'西校园','2'=>'西校园南区'])->label('宿舍区') ?>

    <?= $form->field($model, 'dormitory')->textInput(['maxlength' => true])->label('宿舍楼/栋（1-2位数字）') ?>

    <?= $form->field($model, 'dorm_num')->textInput(['maxlength' => true])->label('宿舍号/室（3位数字）') ?>

  
   <?php   $model->leader =  explode(',',$model->leader); //本句用法参见附录A第2篇文章
          echo  $form->field($model, 'leader')->checkboxList(['宿舍长'=>'宿舍长','楼层长'=>'楼层长','楼栋长'=>'楼栋长'],['unselect'=>'无',
																											'class'=>'hahah1',
																												'id'=>666,	
          																												] )
          																											->label('宿舍管理学生干部')		?>
   
   

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' =>'btn btn-info']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
